import Home from '../pages/home'
import Login from '../pages/login'

export default {
	routes: [
		{
			path:'/',
			component: Home,
			children: [
				{
					path: '/',
					props: true,
					component: () => import('../pages/home/center.vue'),
					meta: { 
						title:'管理中心',
						requiresAuth: true,
					}
				},
				{
					path: '/setting/config',
					component: () => import('../pages/setting/config.vue'),
					meta: {
						title:'系统设置',
						requiresAuth: true,
					}
				},
				{
					path: '/setting/area/list',
					component: () => import('../pages/setting/area/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/area/edit/:id?',
					props: true,
					component: () => import('../pages/setting/area/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/oauth/list',
					component: () => import('../pages/setting/oauth/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/oauth/edit/:id?',
					props: true,
					component: () => import('../pages/setting/oauth/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/oauth/login',
					component: () => import('../pages/setting/oauth/login.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/payment/list',
					component: () => import('../pages/setting/payment/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/setting/payment/edit/:id?',
					props: true,
					component: () => import('../pages/setting/payment/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//管理员
				{
					path: '/manager/password',
					component: () => import('../pages/manager/password.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/list',
					component: () => import('../pages/manager/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/edit/:id?',
					props: true,
					component: () => import('../pages/manager/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/menu/list',
					component: () => import('../pages/manager/menu/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/menu/edit/:id?',
					props: true,
					component: () => import('../pages/manager/menu/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/role/list',
					component: () => import('../pages/manager/role/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/role/edit/:id?',
					props: true,
					component: () => import('../pages/manager/role/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/manager/log/list',
					component: () => import('../pages/manager/log/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//会员
				{
					path: '/member/config',
					component: () => import('../pages/member/config.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/audit',
					component: () => import('../pages/member/audit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/list',
					component: () => import('../pages/member/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/edit/:id?',
					props: true,
					component: () => import('../pages/member/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/group/list',
					component: () => import('../pages/member/group/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/group/edit/:id?',
					props: true,
					component: () => import('../pages/member/group/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/template/list',
					component: () => import('../pages/member/template/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/template/edit/:id?',
					props: true,
					component: () => import('../pages/member/template/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/message/list',
					component: () => import('../pages/member/message/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/message/edit/:id?',
					props: true,
					component: () => import('../pages/member/message/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/recharge/list',
					component: () => import('../pages/member/recharge/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/recharge/edit/:id?',
					props: true,
					component: () => import('../pages/member/recharge/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/amount/list',
					component: () => import('../pages/member/amount/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/amount/edit/:id?',
					props: true,
					component: () => import('../pages/member/amount/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/point/list',
					component: () => import('../pages/member/point/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/member/point/edit/:id?',
					props: true,
					component: () => import('../pages/member/point/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//商户
				{
					path: '/merchant/config',
					component: () => import('../pages/merchant/config.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/audit',
					component: () => import('../pages/merchant/audit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/list',
					component: () => import('../pages/merchant/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/category/list',
					component: () => import('../pages/merchant/category/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/category/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/category/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/store/list',
					component: () => import('../pages/merchant/store/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/store/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/store/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/cash/list',
					component: () => import('../pages/merchant/cash/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/cash/add',
					component: () => import('../pages/merchant/cash/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/cash/show/:id?',
					props: true,
					component: () => import('../pages/merchant/cash/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/amount/list',
					component: () => import('../pages/merchant/amount/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/amount/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/amount/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/menu/list',
					component: () => import('../pages/merchant/menu/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/menu/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/menu/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/list',
					component: () => import('../pages/merchant/article/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/merchant/article/edit/:id?',
					props: true,
					component: () => import('../pages/merchant/article/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//文章
				{
					path: '/article/list',
					component: () => import('../pages/article/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/article/edit/:id?',
					props: true,
					component: () => import('../pages/article/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/article/category/list',
					component: () => import('../pages/article/category/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/article/category/edit/:id?',
					props: true,
					component: () => import('../pages/article/category/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//商城
				{
					path: '/shop/goods/list',
					component: () => import('../pages/shop/goods/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/goods/edit/:id?',
					props: true,
					component: () => import('../pages/shop/goods/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/category/list',
					component: () => import('../pages/shop/category/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/category/edit/:id?',
					props: true,
					component: () => import('../pages/shop/category/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/label/list',
					component: () => import('../pages/shop/label/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/label/edit/:id?',
					props: true,
					component: () => import('../pages/shop/label/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/brand/list',
					component: () => import('../pages/shop/brand/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/brand/edit/:id?',
					props: true,
					component: () => import('../pages/shop/brand/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/field/list',
					component: () => import('../pages/shop/field/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/field/edit/:id?',
					props: true,
					component: () => import('../pages/shop/field/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/sku/list',
					component: () => import('../pages/shop/sku/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/sku/edit/:id?',
					props: true,
					component: () => import('../pages/shop/sku/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/evaluate/list',
					component: () => import('../pages/shop/evaluate/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/coupon/list',
					component: () => import('../pages/shop/coupon/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/coupon/edit/:id?',
					props: true,
					component: () => import('../pages/shop/coupon/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/express/list',
					component: () => import('../pages/shop/express/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/express/edit/:id?',
					props: true,
					component: () => import('../pages/shop/express/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/delivery/list',
					component: () => import('../pages/shop/delivery/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/delivery/edit/:id?',
					props: true,
					component: () => import('../pages/shop/delivery/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/rule/list',
					component: () => import('../pages/shop/rule/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/rule/edit/:id?',
					props: true,
					component: () => import('../pages/shop/rule/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/speed/list',
					component: () => import('../pages/shop/speed/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/speed/edit/:id?',
					props: true,
					component: () => import('../pages/shop/speed/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/convert/list',
					component: () => import('../pages/shop/convert/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/convert/edit/:id?',
					props: true,
					component: () => import('../pages/shop/convert/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/presell/list',
					component: () => import('../pages/shop/presell/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/shop/presell/edit/:id?',
					props: true,
					component: () => import('../pages/shop/presell/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//订单
				{
					path: '/order/config',
					component: () => import('../pages/order/config.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/list',
					component: () => import('../pages/order/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/add',
					component: () => import('../pages/order/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/edit/:id?',
					props: true,
					component: () => import('../pages/order/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/show/:id?',
					props: true,
					component: () => import('../pages/order/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/list',
					component: () => import('../pages/order/delivery/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/add/:id?',
					props: true,
					component: () => import('../pages/order/delivery/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/delivery/show/:id?',
					props: true,
					component: () => import('../pages/order/delivery/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},{
					path: '/order/invoice/list',
					component: () => import('../pages/order/invoice/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/invoice/add/:id?',
					props: true,
					component: () => import('../pages/order/invoice/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/invoice/show/:id?',
					props: true,
					component: () => import('../pages/order/invoice/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/refund/list',
					component: () => import('../pages/order/refund/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/refund/add/:id?',
					props: true,
					component: () => import('../pages/order/refund/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/refund/show/:id?',
					props: true,
					component: () => import('../pages/order/refund/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/exchange/list',
					component: () => import('../pages/order/exchange/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/exchange/add/:id?',
					props: true,
					component: () => import('../pages/order/exchange/add.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/order/exchange/show/:id?',
					props: true,
					component: () => import('../pages/order/exchange/show.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//应用
				{
					path: '/other/advert/list',
					component: () => import('../pages/other/advert/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/other/advert/edit/:id?',
					props: true,
					component: () => import('../pages/other/advert/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/other/banner/list',
					component: () => import('../pages/other/banner/list.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/other/banner/edit/:id?',
					props: true,
					component: () => import('../pages/other/banner/edit.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				//统计
				{
					path: '/report/member/reg',
					component: () => import('../pages/report/member/reg.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/report/member/amount',
					component: () => import('../pages/report/member/amount.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/report/goods/count',
					component: () => import('../pages/report/goods/count.vue'),
					meta: {
						requiresAuth: true,
					}
				},
				{
					path: '/report/order/amount',
					component: () => import('../pages/report/order/amount.vue'),
					meta: {
						requiresAuth: true,
					}
				},
			]
		},
		{
			path:'/login',
			name: 'Login',
			component: Login,
			meta: {
				title:'管理员登录',
				requiresAuth: false,
			}
		},
		{
			path: '*',
			name: '404',
			component: () => import('../pages/error/404.vue'),
			meta: {
				title:'404页面不存在',
				requiresAuth: false,
			}
		},
	]
}